package android.db;

import java.util.ArrayList;
import java.util.Map;

import android.database.Cursor;

/**
 * 
 * @author son.dt
 *
 */
public interface DAO<T extends Persistence> {
	public long insert(T obj) throws Exception;
	public int updateByParam(T obj,Map<String, String> wheres) throws Exception;
	public int delete(Map<String, String> selections);
	public int deleteAll();
	public ArrayList<T> findByParam(Map<String, String> selections) throws Exception;
	public ArrayList<T> findAll()  throws Exception;
	public ArrayList<T> cursorToArray(Cursor cursor) throws Exception;
}
